/*
 * @Author: kanglang
 * @Date: 2020-09-25 11:00:08
 * @LastEditors: kanglang
 * @LastEditTime: 2020-09-27 17:49:53
 * @Description:
 */
/*
 * @Author: liangshuchang
 * @Description:  货物信息组件
 */
import React from 'react';
import {
  View,
  StyleSheet,
  Image,
  Text,
  SafeAreaView,
  TouchableOpacity,
} from 'react-native';
import {
  fontColorDeepGray,
  fontColorOrange,
  px2dp, splitLineColorLightGray
} from '../../../common/styles/index';
import VerticalLine from '../shipper-app/source/components/VerticalLine';
import TypeAssemble from './type-assemble';

export default class GoodsInformation extends React.Component {
  constructor(props) {
    super(props);
    this.state = {};
  }

  render() {
    const { detail, style } = this.props;
    return (
      <View style={[styles.detailsItem, style]}>
        <View style={styles.hTitle}>
          <Text style={{ color: '#333232', fontSize: px2dp(16) * 2 }}>货物信息</Text>
        </View>
        <View>
          <View style={styles.hItem}>
            <TypeAssemble
              // lineData={[wayBill.goods,wayBill.packageType,wayBill.weight]}
              lineData={[detail.goodsName, detail.packageName, `${detail.freightConsignorPer}/${detail.freightUnit}`]}
            />
          </View>
        </View>
      </View>
    );
  }
}

const styles = StyleSheet.create({
  detailsItem: {
    backgroundColor: '#fff',
    borderRadius: px2dp(20),
    marginLeft: px2dp(20),
    marginRight: px2dp(20),
    marginBottom: px2dp(20),
    marginTop: px2dp(20),
    paddingLeft: px2dp(20),
    paddingRight: px2dp(20),
    paddingTop: px2dp(20),
    paddingBottom: px2dp(20)
  },
  hItem: {
    flexDirection: 'row',
    marginTop: px2dp(6),
    marginBottom: px2dp(6),
    color: fontColorDeepGray
  },
  hTitle: {
    paddingBottom: px2dp(24),
    borderBottomWidth: px2dp(1),
    borderBottomColor: splitLineColorLightGray,
    marginBottom: px2dp(23),
    color: '#333232',
    fontSize: px2dp(16) * 2
  },
});
